//
//  DetailViewModel.m
//  HonlivApp
//
//  Created by admin on 2017/6/24.
//  Copyright © 2017年 honliv. All rights reserved.
//

#import "DetailViewModel.h"

//获取动态码接口
static NSString *const Rediect_url = @"api/Commn/RediectToPage";

@implementation DetailViewModel

-(void)getGidWithDic:(NSDictionary *)dic Success:(void (^)(NSString *))completion{
    NSString *gidURL = [NSString stringWithFormat:@"%@%@",HOSPITAL_URL,Rediect_url];
    [NetWorker getNewsDatasWithURLStr:gidURL body:dic success:^(id result) {
        NSDictionary *gidDic = result[@"result"];
        NSString *gidStr = gidDic[@"Gid"];
        completion(gidStr);
    } failure:^(id result) {
        completion(@"");
        [SVProgressHUD showErrorWithStatus:@"获取信息失败"];
    }];

}


@end
